﻿@{
  ViewBag.Title = "UploadFile";
}

<h2>UploadFile</h2>
<form id="form" action="@Url.Action("UploadFile")" method="post">
  <input type="text" name="type" value="" />
  <button type="submit">submit</button>
</form>
@section scripts{
  <script src="~/Scripts/jquery.form.js"></script>
  <script>
    $(function () {
      $('#form').ajaxForm({
        dataType: "json",
        success: function (data) {
          alert(data.type);
        }, error: function (xhr, textStatus, errorThrown) {
          alert(textStatus);
        }
      });
    })
  </script>
}